Skip to content

Comments

feat(spaces): add cover image upload functionality for space creation and editing#14

Open
Hldao wants to merge 19 commits intodevelopfrom
feature/functionality-updates
Open

feat(spaces): add cover image upload functionality for space creation and editing#14
Hldao wants to merge 19 commits intodevelopfrom
feature/functionality-updates

Conversation

@Hldao
Copy link
Collaborator

@Hldao Hldao commented Jan 24, 2026

Summary

  • Add cover image upload option to space creation modal with ImageUploader component
  • Add cover image upload option to space editing modal with proper state management
  • Update AuthService.createSpace() to support coverUrl parameter
  • Update AuthService.updateSpace() to support coverUrl parameter

Technical Details

  • Added ImageUploader components to both create and edit space modals
  • Implemented proper state management for cover image URLs with initialization and cleanup
  • Updated API service methods to support optional coverUrl parameter
  • Maintained consistent UI patterns with existing image upload functionality

Test plan

  • Test space creation with cover image upload
  • Test space creation without cover image (should use default)
  • Test space editing with new cover image upload
  • Test space editing with existing cover image modification
  • Verify API calls include coverUrl parameter correctly
  • Test modal state cleanup when closing/canceling

🤖 Generated with Claude Code

Copus Team and others added 19 commits January 24, 2026 16:24
… and editing

- Add cover image upload option to space creation modal with ImageUploader component
- Add cover image upload option to space editing modal with proper state management
- Update AuthService.createSpace() to support coverUrl parameter
- Update AuthService.updateSpace() to support coverUrl parameter
- Add proper state initialization and cleanup for cover image URLs
- Support optional cover images with fallback to default sharing images
- Maintain consistent UI patterns with existing image upload functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…e functionality

- Fix ImageUploader import to use named export instead of default export
- Update ImageUploader props to match actual component interface (type, currentImage, onImageUploaded)
- Add missing export statement to SpaceContentSection component
- Ensure cover image upload works correctly for space creation and editing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add 5-layer caching system (articles, images, users, API, CSS)
- Implement intelligent resource preloader with hover detection
- Add CSS critical rendering path optimization
- Create development performance monitoring dashboard
- Enhance LazyImage with better preloading and optimization
- Optimize useArticles hook with caching and debouncing
- Improve lazy loading for Discovery, Create, and Following screens

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Change environment check from development-only to non-production
- Allow performance panel visibility in test.copus.network
- Enable CSS performance logging in staging/test environments
- Performance tools now work in development and test environments

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create missing devLogger utility for development logging
- Fix syntax error in useArticles.ts setState callback
- Correct indentation and structure in useArticles hook
- Dev server now running successfully on port 5173

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Import getNetworkConfig from config/contracts
- Resolves "getNetworkConfig is not defined" error
- Fixes x402 payment functionality in Content component

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add startTransition import to Content.tsx
- Wrap setShouldShowModal, setCollectModalOpen, setIsCommentSectionOpen, and setIsPayConfirmOpen with startTransition
- Fixes React 18 Suspense error: "A component suspended while responding to synchronous input"
- Improves concurrent rendering performance for lazy-loaded components

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add startTransition import to HeaderSection
- Create navigateWithTransition wrapper function
- Update all navigate() calls in search results, avatar clicks, and onClick handlers
- Replace direct navigate calls with navigateWithTransition
- Add useTransitionNavigation hook for future use
- Fixes remaining React 18 Suspense navigation errors

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…Suspense errors

- Added startTransition to React imports across multiple components
- Wrapped navigate() calls with startTransition(() => { navigate(...); })
- Fixed React 18 concurrent mode compatibility issues
- Components updated:
  * MobileMenu: 4 navigate calls wrapped
  * Login: 7 navigate calls wrapped
  * Create: 3 navigate calls wrapped
  * ArticleCard: 1 navigate call wrapped
  * NotificationPanel: 3 navigate calls wrapped
  * SpaceContentSection: 8 navigate calls wrapped
  * MainContentSection: 3 navigate calls wrapped

This prevents "A component suspended while responding to synchronous input"
errors that were occurring when navigating between lazy-loaded routes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixed 45 additional navigate() calls across 8 critical components:
- HeaderSection: 1 navigate call (notification navigation)
- DiscoveryContentSection: 7 navigate calls
- NotificationListSection: 20 navigate calls
- CommentItem: 4 navigate calls
- FollowingContentSection: 6 navigate calls
- Content: 5 navigate calls
- UserProfile: 1 navigate call
- MyTreasury: 1 navigate call

Total: 74 navigate calls now properly wrapped with startTransition
across 15 components to eliminate React Suspense errors.

This ensures all navigation state changes are deferred using React 18
concurrent features, preventing "component suspended while responding
to synchronous input" errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Wrapped RouterProvider with Suspense fallback to handle route-level lazy loading
- Added SuspenseErrorBoundary to LazyRoute for better error handling
- Improved React 18 concurrent mode compatibility with router navigation

This should eliminate remaining React Suspense errors by properly handling
lazy-loaded route components at the router level.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add complete subscription button component with email collection flow
- Add anti-abuse service with risk assessment and rate limiting
- Add subscription service with mock data management
- Add subscription type definitions
- Translate Following page texts to English (Following page title, author sections)
- Translate anti-abuse service messages to English
- Fix Following page positioning and layout issues
- Restore SubscribeButton integration in UserProfile and MyTreasury pages
- Add comprehensive subscription functionality across the application

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Merge latest develop branch features including UserCard component and enhanced TreasuryCard
- Preserve subscription functionality improvements and Following page layout fixes
- Add new AI plugin functionality, taste profile features, and SEO enhancements
- Maintain translated subscription messages and anti-abuse service improvements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…nglish localization

- Extended SubscribeButton component to support both author and space subscriptions
- Added spaceId, spaceName, and subscriptionType parameters for space integration
- Simplified subscription flow by removing push frequency selection modal
- Integrated SubscribeButton into space pages with proper spaceId handling
- Added subscription buttons to user profile and treasury pages for unlogged users
- Translated all subscription UI text from Chinese to English for better accessibility
- Improved subscription button positioning across all pages (right-aligned)
- Enhanced Following page with UserCard integration and better layout
- Fixed spaceId parameter passing in SpaceInfoSection component

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Resolved merge conflicts in subscription components
- Integrated develop branch UI improvements with space subscription functionality
- Combined English localization with enhanced Following page experience
- Maintained all anti-abuse security features and subscription flow simplification
- Added unsubscribe dropdown and improved styling from develop branch

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add support for new /client/follow/subscribe API endpoint
- Implement subscribeToSpace and unsubscribeFromSpace methods
- Update SubscribeButton to handle both author and space subscriptions
- Add proper targetType handling (0 for users, 1 for spaces)
- Maintain fallback mechanism for backward compatibility
- Preserve all existing anti-abuse and security features

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove all sample/mock data from Following page
- Integrate pageMyFollowedArticle API for real article data
- Use API follower counts instead of subscription service
- Add refresh mechanism for subscription list updates
- Production-ready API-first architecture implementation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Integrate auto-follow treasuries on author subscription
- Adopt new modal UI design from develop branch
- Keep improved success messages and refresh mechanisms
- Combine develop branch styling with our API optimizations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unnecessary "My profile card" display from following page
- Fix subscription button states to show correct "Unsubscribe/Subscribed" status
- Update API interfaces to match new endpoint specifications
- Optimize API calls to prevent unnecessary requests
- Translate Chinese comments to English for better code maintainability
- Improve user experience by not showing current user in their own following list

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant